class MyWorker < ActiveBackground::Worker
  def work
    # work_on :all
    # get a connection
    
    database do
      @persons = Person.find(:all)
    end
    
    database do
      @persons2 = Person.find(:all)
    end
    
    ACTIVE_BACKGROUND_LOGGER.warn(@persons.size)
    ACTIVE_BACKGROUND_LOGGER.warn(@persons2.size)
        
    ACTIVE_BACKGROUND_LOGGER.info(' ** worked')
  end
    
  def task_find_feed
    ACTIVE_BACKGROUND_LOGGER.info(' ** find feed')
  end
  
  def task_fetch_website
    ACTIVE_BACKGROUND_LOGGER.info(' ** fetch website')
  end
  
  def task_fetch_images
    ACTIVE_BACKGROUND_LOGGER.info(' ** fetch images')
  end
  
  def task_index_feed
    ACTIVE_BACKGROUND_LOGGER.info(' ** index feed')
  end
  
  def task_store
    ACTIVE_BACKGROUND_LOGGER.info(' ** store')
  end
end